package com.han.dao.user;

import com.han.pojo.Role;
import com.han.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //用户登录，检测账户是否存在
    public User getUserLogin(Connection connection,String userCode) throws SQLException;

    //修改密码
    public int updateUser(Connection connection,int id,String userPassword) throws SQLException;

    //查询用户数量
    public int getUserCount(Connection connection,String userName,int userRole) throws SQLException;

    //通过条件查询-userList
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize)throws Exception;

    //插入用户
    public int addUser(Connection connection, List<Object> user) throws SQLException;

    //删除用户
    public boolean deleteUser(Connection connection, int id) throws SQLException;

    //通过id查询用户
    public User getUserById(Connection connection, int id) throws SQLException;

    //修改用户
    public int ModifyUser(Connection connection, User user) throws SQLException;
}
